package lib.wzh.com.libcore.framework.enums;

import lib.wzh.com.libcore.framework.interfaces.BaseEnum;

/**
 * @Author lib
 * @Date 2021/11/23 13:38
 * @ClassName ResponseEnum
 * @Version v1.0
 */

public enum ResponseEnum implements BaseEnum {
    /**
     * 请求成功
     */
    SUCCESS("1","请求成功",true),

    /**
     * 失败
     */
    FAIL("0", "系统内部异常",false),

    /**
     * 数据校验失败
     */
    VALIDATED_ERROR("400","数据校验失败",false),

    /**
     * 没有查询到数据
     */
    NO_DATA("0","没有查询到数据",false),

    /**
     * 文件上传异常
     */
    UPLOAD_FILE_FAIL("0","文件上传异常",false)

    ;
    private final String code;

    private final String msg;

    private final Boolean success;

    ResponseEnum(String code, String msg, Boolean success) {
        this.code = code;
        this.msg = msg;
        this.success = success;
    }

    @Override
    public String code() {
        return code;
    }

    @Override
    public String msg() {
        return msg;
    }

    @Override
    public Boolean success() {
        return success;
    }
}
